-
Notifications
You must be signed in to change notification settings - Fork 7
feat: [Tolk] Migration from FunC #1093
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
To fix the formatting issues:
npx remark -o --silent --silently-ignore languages/tolk-vs-func/in-detail.mdx languages/tolk-vs-func/in-short.mdx languages/tolk-vs-func/mutability.mdx languages/tolk-vs-func/stdlib.mdx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update—across languages/tolk-vs-func, there are several suggestions; please apply the inline suggestions.
|
To fix the formatting issues:
npx remark -o --silent --silently-ignore languages/tolk-vs-func/in-detail.mdx languages/tolk-vs-func/in-short.mdx languages/tolk-vs-func/mutability.mdx languages/tolk-vs-func/stdlib.mdx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the updates — I reviewed changes under languages/tolk-vs-func/. I’ve left several suggestions; please apply the inline suggestions to address wording and example syntax.
|
To fix the formatting issues:
npx remark -o --silent --silently-ignore languages/tolk/vs-func/in-detail.mdx languages/tolk/vs-func/in-short.mdx languages/tolk/vs-func/mutability.mdx languages/tolk/vs-func/stdlib.mdx languages/tolk/tolk.mdx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the changes. In languages/tolk/vs-func/in-detail.mdx:, I’ve left several suggestions; please apply the inline suggestions.
|
/review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the updates—reviewed changes under languages/tolk. There are several suggestions below; please apply the inline suggestions.
| ```tolk | ||
| var cell = ... | ||
| var cell: cell = ... | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[HIGH] Literal ellipses used in code examples (copy/paste hazard)
The code block uses ... to indicate omitted code, which changes syntax and makes snippets non‑runnable. The style guide requires using language‑appropriate comments to mark omissions instead of literal ellipses. See Comments and omissions (https://github.com/ton-org/docs/blob/main/contribute/style-guide-extended.mdx?plain=1#L532-L535). Similar patterns occur elsewhere (e.g.,
docs/languages/tolk/vs-func/in-short.mdx
Lines 24 to 36 in dc05e7e
| fun parseData(cs: slice): cell { | |
| var flags: int = cs.loadMessageFlags(); | |
| ... | |
| } | |
| @inline | |
| fun sum(a: int, b: int) { // auto inferred int | |
| val both = a + b; // same | |
| return both; | |
| } | |
| get fun currentCounter(): int { ... } | |
| ``` |
docs/languages/tolk/vs-func/mutability.mdx
Lines 210 to 224 in dc05e7e
| fun increment(mutate x: int): void { ... } | |
| // does: (x', _) = increment(x); x = x' | |
| increment(mutate x); | |
| // returns (int, int, (slice, cell)) | |
| fun f2(mutate x: int, mutate y: int): (slice, cell) { ... } | |
| // does: (x', y', r) = f2(x, y); x = x'; y = y'; someF(r) | |
| someF(f2(mutate x, mutate y)); | |
| // when `self`, it's the same | |
| // does: (cs', r) = loadInt(cs, 32); cs = cs'; flags = r | |
| flags = cs.loadInt(32); | |
| ``` |
Please leave a reaction 👍/👎 to this suggestion to improve future reviews for everyone!
|
/review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the updates—I've queued several suggestions in languages/tolk/vs-func. Please apply the inline suggestions.
| If omitted, it's auto-inferred: | ||
|
|
||
| ```tolk | ||
| fun x() { ... } // auto infer from return statements |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[HIGH] Literal ellipses used inside fenced code
The example uses ... as a placeholder in code, violating the rule to avoid literal ellipses that change syntax and produce non-runnable examples. Convert to a comment while preserving the explanatory trailing comment. See https://github.com/ton-org/docs/blob/main/contribute/style-guide-extended.mdx?plain=1#L532-L535.
Please leave a reaction 👍/👎 to this suggestion to improve future reviews for everyone!
| return both; | ||
| } | ||
|
|
||
| get fun currentCounter(): int { ... } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[HIGH] Literal ellipses used inside fenced code
A single-line function stub includes ... inside code, which changes syntax and renders the snippet non-runnable. The style guide requires using comments to mark omitted code, not literal ellipses. See https://github.com/ton-org/docs/blob/main/contribute/style-guide-extended.mdx?plain=1#L532-L535.
Please leave a reaction 👍/👎 to this suggestion to improve future reviews for everyone!
8b1b9e3 to
aab5068
Compare
|
To fix the formatting issues:
npx remark -o --silent --silently-ignore languages/tolk/from-func/in-detail.mdx languages/tolk/from-func/in-short.mdx languages/tolk/from-func/mutability.mdx languages/tolk/from-func/stdlib.mdx languages/tolk/overview.mdx |
da72516 to
4fd58df
Compare
closes #1039